package com.fubang.fubangexam.utils;

import android.widget.Toast;

import com.fubang.fubangexam.base.GlobalApplication;


/**
 * 吐司工具类
 * <p>
 * Created by Jerry on 2017/4/18.
 */

public class ExamToastUtil {
    private static Toast toast;

    public static void showToast(String text, int duration) {
        if (toast != null) {
            toast.setText(text);
            toast.setDuration(duration);
        } else {
            toast = Toast.makeText(GlobalApplication.getInstance(), text, duration);
        }
        toast.show();
    }
}
